package org.geometerplus.zlibrary.text.view;

import com.chineseall.reader.ui.util.ReadSettingUtil;
import com.chineseall.reader.ui.view.readmenu.ReadStyle;

import org.geometerplus.zlibrary.core.util.ZLColor;

/**
 * Created by Loy on 16-1-22.
 */
public class ZLTTSTextSelection {
    private ZLTextElementArea mFirstArea, mLastArea;
    final static public ZLColor BgColor = new ZLColor(0x0D, 0x65,0xA8, 0x55);
    final static ZLColor[] selectedColors = { new ZLColor(0x4D777777), new ZLColor(0x4D3BA2FF),
            new ZLColor(0x4DD97474), new ZLColor(0x4D70BF70), new ZLColor(0x4D6994B5),
            new ZLColor(0x4DD3923C), new ZLColor(0x4DDEF7DE)};

    public ZLTTSTextSelection()
    {

    }
    public void setAreas(ZLTextElementArea firstArea, ZLTextElementArea lastArea)
    {
        mFirstArea = firstArea;
        mLastArea = lastArea;
    }
    public ZLTextElementArea getFirstArea()
    {
        return mFirstArea;
    }
    public ZLTextElementArea getLastArea()
    {
        return mLastArea;
    }

    public static ZLColor getSelectedColor(){
        ReadStyle style = ReadSettingUtil.getReadStyle();
        if(style == ReadStyle.NIGHT){
            return selectedColors[0];
        } else if (style == ReadStyle.CLASSIC){
            return selectedColors[1];
        } else if (style == ReadStyle.PEACHBLOSSOM){
            return selectedColors[2];
        }else if (style == ReadStyle.COMFORT){
            return selectedColors[3];
        }else if (style == ReadStyle.QUIET){
            return selectedColors[4];
        }else if (style == ReadStyle.NOSTALGIA){
            return selectedColors[5];
        }else if (style == ReadStyle.EYESHIELD){
            return selectedColors[6];
        }else{
            return selectedColors[1];
        }
    }

}
